﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Chapter08_Lesson01
{
    class Program
    {
        static void Main(string[] args)
        {
            AppDomain appDomain = AppDomain.CreateDomain("teste");
            
            System.Security.Policy.Evidence e = new System.Security.Policy.Evidence(new object[] {new System.Security.Policy.Zone(System.Security.SecurityZone.MyComputer)}, null); 

            Console.WriteLine("The host appDomain name is {0}", AppDomain.CurrentDomain.FriendlyName);
            Console.WriteLine("The child appDomain name is {0}", appDomain.FriendlyName);

            appDomain.ExecuteAssemblyByName(@"ShowWinIni", e);

            AppDomain.Unload(appDomain);
        }
    }
}
